Skip to content

feat/draft: 드래프트 관련 수정 - #82

Merged
hwichoi0317 merged 1 commit into
devfrom
feature/draft
Aug 20, 2025
Merged

feat/draft: 드래프트 관련 수정#82
hwichoi0317 merged 1 commit into
devfrom
feature/draft

Conversation

@hwichoi0317

@hwichoi0317 hwichoi0317 commented Aug 20, 2025

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • 신기능
    • 드래프트 참가자 목록이 로그인한 사용자 기준으로 개인화되며, 본인 여부 표시가 추가되었습니다.
    • 참가자 정보에 사용자 이름/이메일(가능한 경우)이 노출되어 식별이 쉬워졌습니다.
    • 베스트 일레븐 선택 시 포지션별 최소/최대 선발 인원이 함께 제공되어, 구성 규칙을 명확히 확인할 수 있습니다.

@coderabbitai

coderabbitai Bot commented Aug 20, 2025

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

Walkthrough

인증 사용자 컨텍스트를 Draft 참가자 조회 흐름에 도입했다. 컨트롤러와 서비스 메서드 시그니처에 사용자 정보를 추가하고, Participant 엔티티의 DTO 변환 로직이 사용자 이메일 기반 userFlag를 설정하도록 변경되었다. 또한 ElementType DTO에 squadMinPlay/squadMaxPlay 필드가 추가되고 매핑이 확장되었다.

Changes

Cohort / File(s) Summary
Draft 참가자 조회 인증 연동
.../domain/draft/controller/DraftController.java, .../domain/draft/service/DraftService.java, .../domain/match/entity/Participant.java, .../domain/draft/dto/DraftParticipant.java
컨트롤러와 서비스의 getParticipantsByDraftId에 인증 사용자 정보(이메일) 전달 추가. Participant.toDtoList에 userEmail 파라미터 추가 및 DTO 매핑 시 userEmail/userName/userFlag 설정. DraftParticipant에 userFlag 필드 추가.
ElementType DTO 확장
.../domain/player/dto/ElementTypeDto.java, .../domain/player/entity/ElementType.java
ElementTypeDto에 squadMinPlay, squadMaxPlay 필드 추가 및 ElementType.toDtoList에서 해당 필드 매핑 추가.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor U as Authenticated User
  participant C as DraftController
  participant S as DraftService
  participant P as Participant (entity)

  U->>C: GET /api/draft/{draftId}/participants (AuthenticationPrincipal)
  C->>S: getParticipantsByDraftId(draftId, userEmail)
  S->>P: toDtoList(participants, userEmail)
  P-->>S: List<DraftParticipant> (userFlag set)
  S-->>C: List<DraftParticipant>
  C-->>U: 200 OK + JSON
  note over P,S: userEmail 일치 시 userFlag=true
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

enhancement

Suggested reviewers

  • jaehyeok-code
  • wjkim9
  • Kim-Jaehyun0328

Poem

토끼가 탁— 점프해 깃발을 꽂네, userFlag!
이메일 맞추며 살짝 고개 끄덕, “이건 내 자리야.”
드래프트 들판에 이름이 피고, 별들이 반짝—
스쿼드의 최소·최대도 촘촘히 세고,
밤바람 타고 응답은 200 OK로 춤춘다. 🐇✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between f66e6b7 and 3aff8a5.

📒 Files selected for processing (6)
  • backendProject/src/main/java/likelion/mlb/backendProject/domain/draft/controller/DraftController.java (2 hunks)
  • backendProject/src/main/java/likelion/mlb/backendProject/domain/draft/dto/DraftParticipant.java (1 hunks)
  • backendProject/src/main/java/likelion/mlb/backendProject/domain/draft/service/DraftService.java (1 hunks)
  • backendProject/src/main/java/likelion/mlb/backendProject/domain/match/entity/Participant.java (1 hunks)
  • backendProject/src/main/java/likelion/mlb/backendProject/domain/player/dto/ElementTypeDto.java (1 hunks)
  • backendProject/src/main/java/likelion/mlb/backendProject/domain/player/entity/ElementType.java (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/draft

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@hwichoi0317
hwichoi0317 merged commit 895f844 into dev Aug 20, 2025
1 check was pending
@hwichoi0317
hwichoi0317 deleted the feature/draft branch August 20, 2025 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant